git-checkout.sh: handle running git-checkout from a different directory
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 13 Oct 2022 13:05:04 +0000 (14:05 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Oct 2022 19:56:57 +0000 (20:56 +0100)
commit4834dd5521a36cec118ed84b7c09a509edaafa6b
tree1c2e80869e0653ad6825ac3e124ba0d0b25e5c9f
parent4c1a3cca790f0a11d3d803f0406845f46a50d177
git-checkout.sh: handle running git-checkout from a different directory

"$DIR" might not be a full path and it might not have `pwd` as ".."
directory. So use `cd -` to undo the first `cd` command.

Also, use `basename` to make a symbolic link with a relative path.

This doesn't matter yet but it will when for example the commands to
clone OVMF is been run from tools/ rather than tools/firmware/.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
scripts/git-checkout.sh